# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=ukwm
pkgver=1.2.1
pkgrel=4
pkgdesc="A lightweight GTK+ window manager"
arch=('loong64' 'x86_64')
license=('GPL')
url="https://github.com/ukui/ukwm"
groups=('ukui')
depends=('gnome-desktop' 'gobject-introspection-runtime' 'libinput' 'libxkbcommon-x11' 'ukui-settings-daemon' 'upower' 'libcanberra')
makedepends=('gobject-introspection' 'mate-common' 'intltool' 'wayland-protocols')
source=("$pkgname-$pkgver.tar.gz::https://github.com/ukui/ukwm/archive/v$pkgver.tar.gz")
sha512sums=('079cfa15d6e6c2075da2c5795f463274db57422ec8739a48ef82e2e945e057b19c586968380de6176f7ba890c2cbb89901166173122ea953d55d407c60732a50')

prepare() {
  cd $pkgname-$pkgver
  NOCONFIGURE=1 ./autogen.sh

  sed -i 's/GETTEXT_MACRO_VERSION = 0.19/GETTEXT_MACRO_VERSION = 0.20/' po/Makefile.in.in
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --libexecdir=/usr/lib/$pkgname --sysconfdir=/etc --enable-introspection --enable-compile-warnings=yes
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
